import java.io.*;public class FileInputStreamTest {    public static void main(String[] args) {       FileInputStream fis = null;        try {            fis =new FileInputStream("myFile.dat");            while(fis.available()>0)                System.out.print(fis.read() + " ");        } catch (FileNotFoundException e) {            e.printStackTrace();        } catch (IOException e) {            e.printStackTrace();        } finally{            if(fis !=null){                try {                    fis.close();                } catch (IOException e) {                    e.printStackTrace();                }            }        }    }}